1. Technical Field
The present invention relates to a method for correcting chromatic aberration that occurs in an image.
2. Background Art
Images obtained by photographing contain a color shift caused by chromatic aberration of a lens used for the photographing.
One of methods for detecting such a color shift is a method of storing in advance the amount of color shift corresponding to a state of the lens (see, for example, PTL 1). Alternatively, another method is a method of calculating the amount of shift in position between different color signals in an image by calculating correlation between the color signals, and detecting the amount of color shift (see, for example, PTL 2). n amount of color shift is a continuously changing value. Thus, in order to correct the amount of color shift determined in the above manner in a digital image, it is necessary to correct the amount of color shift in units of less than one pixel. Interpolation algorithms such as bilinear interpolation and bicubic interpolation have been proposed as methods for correcting the amount of color shift in units of less than one pixel.
In bilinear interpolation, bicubic interpolation, or other similar interpolation computations, an FIR filter whose coefficient changes depending on the interpolation position is used. If these interpolation computations are used, the manner in which bands disappear is different depending on the shift position, resulting in variations in the passband in an output image. Thus, a problem occurs in that image quality is impaired.
The reason for the difference in the manner in which bands disappear in the bilinear interpolation will be described.
FIG. 10 is a diagram illustrating a computation using bilinear interpolation. P1, P2, P3, and P4 represent the centers of gravity of four pixels arranged vertically and horizontally on an image pickup element. In order to obtain a signal level at coordinates Q that are located between the centers of gravity P1 to P4 and that do not match those of the center of gravity of any pixel arranged on the image pickup element, it is necessary to compute the signal level by interpolation from the signal levels of the neighboring pixels having the centers of gravity P1 to P4. α and β represent the amounts of shift at the coordinates Q from the centers of gravity P1 to P4. In bilinear interpolation, when the signal levels at the centers of gravity P1, P2, P3, and P4 are represented by Ps1, Ps2, Ps3, and Ps4, respectively, the signal level at the coordinates Q, Qs, is determined using Equation (1):Qs={(1−α)×Ps1+α×Ps2}×(1−β)+{(1−α)×Ps4+α×Ps3}×β  (1)Equation (1) is equivalent to the application of an FIR low-pass filter having two taps with coefficients (1−α) and α in the horizontal direction and the application of an FIR low-pass filter having two taps with coefficients (1−β) and β in the vertical direction. Therefore, the horizontal low-pass effect changes depending on the value of α, and the vertical low-pass effect changes depending on the value of β. Note that α and β take values in a range greater than or equal to 0 and less than or equal to 1.
FIG. 11 illustrates differences in the amplitude characteristics of the signal at the coordinates Q, which are caused by differences in the value of the amount of shift α. When α is 0.0 or 1.0, the amplitude gain of signals at high frequencies including the Nyquist frequency is not reduced whereas when α is 0.5, the amplitude gain at the Nyquist frequency is 0. As α approaches 0.0 or 1.0, the amount of reduction in the amplitude gain at high frequencies centered on the Nyquist frequency decreases. As α approaches 0.5, the amount of reduction in the amplitude gain at high frequencies centered on the Nyquist frequency increases. The same applies to β in the vertical direction.
Thus, if bilinear interpolation is used to determine a signal level at certain coordinates, in accordance with the distance therefor, the degree of disappearance of high-frequency components of the signal level differs. Referring to FIG. 10 by way of example, the degree of disappearance of high-frequency components of the signal level Qs increases in a region where the position of the coordinates Q is closer to the middle of the centers of gravity P1 to P4, and the degree of disappearance of high-frequency components of the signal level Qs decreases in a region where the position is closer to one of the centers of gravity P1 to P4. Since there are a large number of blocks having four pixels as above in an image, the correction of a color shift caused by magnification chromatic aberration may cause the presence of regions where an extremely large number of high-frequency components of the signal level are lost and regions where a not so large number of high-frequency components are lost, resulting in a patchy distribution of high-frequency components.
Another problem is that since the correction of chromatic aberration does not involve position shifting for the signal level of a color at a position reference point, variations of bands between a color for which position shifting is not performed and colors for which position shifting has been performed appear as degradation of image quality.
Citation List
Patent Literature
PTL 1: Japanese Patent Laid-Open No. 8-205181
PTL 2: Japanese Patent Laid-Open No. 2006-020275